#include <iostream>
#include <vector>
#include <string>
#include <stdio.h>

using namespace std;


struct School
{
    char name[255];
};

struct Student
{
    School * school;
    char name[255];
    float score;
};



const char* man_help = ""
    "demo: this is a program \n"
    "help print this \n"
    "schools print school list\n"
    "students print students list\n"
    "addsc new school record\n"
    "addst new student record\n"
;


struct CmdLine
{
    char name[10];
    void(* func)();
};

void help(){
    cout<< man_help << endl;
}

void q(){
    exit(0);
}

CmdLine cmds[]={
    CmdLine{"help\0",&help},
    CmdLine{"q\0",&q},
};

void exec_command(char * cmd){
    int len = sizeof(cmds);
    for (int i = 0; i < 2; i++)
    {
        if (!strcmp(cmd,cmds[i].name))
        {
             cmds[i].func();
        }
        
    }
    
};

int main()
{
    char args[29];
    char command[11];command[10] = '\0';

    int len ;
    
    while (1)
    {
        printf("\n>$ ");
        scanf("%10s",&command);
        exec_command(command);
    }
    
}